using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SmartLink.Domain.Entity;
using SmartLink.Domain.ExpandEntity;
using SmartLink.Domain.ExpandEntity.Base;

namespace SmartLink.IRepository
{
    public interface IBIZ_OrganizationDeptRepo : IRepository<BIZ_OrganizationDepartment>
    {
        BIZ_OrganizationDepartment GetMaxSortDeptByParentId(int? orgDeptPid);
        IList<DepartmentExpand> GetOrganizationDeptList(int oid, string keyValue, Pagination pagination);
        BIZ_OrganizationDepartment GetSingleOrganizationDepartment(int orgDeptId);
        IEnumerable<BIZ_OrganizationDepartment> GetOrgDeptList(int orgId);
        IList<BIZ_OrganizationDepartment> GetAllStoreByOrgId(int orgId);
        IList<int> GetAllChildDeptIds(int orgDeptId);
        List<int> GetAllChildDeptIds();
        bool Delete(int orgDeptId);
        BIZ_OrganizationDepartment GetByNameAndOid(string departmentName, int oid);
        IList<BIZ_OrganizationDepartment> GetAllChildDepts(IList<int> deptIds);
        IList<BIZ_OrganizationDepartment> GetAllChildDeptsByDeptId(int orgDeptId);
        string GetAllChildDeptsStr(int orgDeptId);
        bool CheckExistByDeptName(int oid, string DeptName);
        bool DeleteByOrgId(int orgId);

        IList<int> GetSelfAndDescendantsIdList(int orgDeptId);
        IEnumerable<BIZ_OrganizationDepartment> GetDescendants(int topOdid, bool withSelf = false);
        bool ExistDescendantDepts(int deptId);
    }
}
